<?php namespace Model;


use \Gas\Core;
use \Gas\ORM;

class Survey extends ORM {
	
	public $primary_key = 'id';

	function _init()
	{
		self::$relationships = array(
				'employee'		=> ORM::belongs_to('Model\\Employee'),
				'traininggroup' => ORM::belongs_to('Model\\Traininggroup'),
		);
		
		self::$fields = array(
			'id' 				=> ORM::field('char[64]'),
			'traininggroup_id' 	=> ORM::field('int[10]'),
			'employee_id' 		=> ORM::field('int[10]'),
			'survey_from' 		=> ORM::field('datetime'),
			'survey_to' 		=> ORM::field('datetime'),
		);

	}
}
